package com.airbnb.epoxy;

import ohos.interwork.utils.ParcelableEx;
import ohos.utils.Parcel;
import ohos.utils.ParcelException;

public class ColorData implements ParcelableEx {
  private long id;
  /*@ColorInt */private int colorInt;
  private boolean playAnimation;

  public ColorData(int colorInt, long id) {
    this.colorInt = colorInt;
    this.id = id;
  }

  public long getId() {
    return id;
  }

  /*@ColorInt*/
  public int getColorInt() {
    return colorInt;
  }

  public void setColorInt(/*@ColorInt*/ int colorInt) {
    this.colorInt = colorInt;
  }

  public void setPlayAnimation(boolean playAnimation) {
    this.playAnimation = playAnimation;
  }

  public boolean shouldPlayAnimation() {
    return playAnimation;
  }

  protected ColorData(Parcel in) {
    this.colorInt = in.readInt();
    this.id = in.readLong();
  }

  @Override
  public void marshallingEx(Parcel dest) throws ParcelException {
    dest.writeInt(this.colorInt);
    dest.writeLong(this.id);
  }

  @Override
  public void unmarshallingEx(Parcel in) throws ParcelException {
    this.colorInt = in.readInt();
    this.id = in.readLong();
  }
}
